var express = require('express'),
    swig = require('swig-templates'),
    request = require('request'),
    router = express.Router(),
    common = require('../base/common.js');
router.get('/my-order',function(req, res,next) {
    console.log(req.cookies.u_id)
    console.log(config.resourcePath.apiRoot + "/index.php?m=PersonalCenter&a=getUserServiceList")
    request.post({
        url: config.resourcePath.apiRoot + "/index.php?m=PersonalCenter&a=getUserServiceList",
        formData: {
            u_id: req.cookies.u_id?req.cookies.u_id:'',
            phone_number: req.cookies.phone_number?req.cookies.phone_number:'',
            limit: 1000,
            stype:'T02'
        }
    }, function (error, response, body) {
        var thatData={};
        try {
            var result = JSON.parse(body);
            console.log(result);
            thatData.thatData=result;
            res.render('my-haier/my_order/my_order',thatData);
        } catch (e) {
        }
    });
});
module.exports = router;
